<?php
namespace app\webadmin\controller;
use think\Cache;
use think\Request;
use think\Db;
use app\webadmin\model\Admin as admin;
class Auth extends Base{
    protected $admin;

    public function _initialize(){
        $this->admin = new admin();
    }

    public function authlogin(Request $request){
        if($request->isPost()){
            $res = $this->admin->logincheck($request->param('username',''),$request->param('password',''));
            return $res;
        }else{
            return $this->fetch();
        }
    }
}